====== XML Sitemap for Search Engines ====== [[DokuWiki]] can automatically create an [[http://www.sitemaps.org/|XML Sitemap]] used by several big search engines like Google, Yahoo, and Microsoft. Before continuing, **enable** sitemap creation by setting the [[config:sitemap]] properties under Configuration Settings((The value of "Generate Google sitemap this often (in days)" has to be greater than 0.)). The sitemap is placed in the cache subdirectory of your DokuWiki installation. It will be accessed by the following type of URL ''%%http://your_domain/dokuwiki/doku.php?do=sitemap%%''. When the sitemap is updated, DokuWiki will inform the following search engines automatically through a HTTP "ping": * [[http://www.google.com|Google]] * [[http://www.yahoo.com|Yahoo]] * [[http://www.live.com|Microsoft Live/MSN]] If the Google Search Console is used, the above URL can be submitted((Eventually an error is shown first, but after some time the sitemap will be accepted.)). Another possibility is the inclusion of the command ''%%Sitemap: http://your_domain/dokuwiki/doku.php?do=sitemap%%'' in the ''robots.txt'' file. **Note:** the sitemap will only contain pages that are readable by the public without logging in. ===== Sitemap Validity ===== Sitemaps are bound to a domain name. If your sitemaps contains URLs of the form ''%%http://domain.org%%'', the sitemap will not be valid when pulled from ''%%http://www.domain.org%%'' and vice versa. To make sure a canonical URL is used you can either configure the [[config:baseurl]] setting or redirect "mismatching" URLs via another [[rewrite|rewrite]] rule in your ''.htaccess'': **Rewrite example (Apache):** RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.domain\.org$ [NC] RewriteRule ^(.*)$ http://www.domain.org/$1 [R,L] ===== Cache ===== The XML sitemap file generated is located at ''dokuwiki/data/cache/sitemap.xml.gz''. If you have made change in your authorization scheme, you may want to delete this file in order to get an accurate file. The [[plugin:stale|Stale Plugin]] also deletes this file if present. ===== Read more ===== * [[seo|DokuWiki and Searchengines]] * [[https://www.google.com/webmasters/tools/siteoverview|Google Webmaster Tools]] use it to manage your sitemaps and monitor googlebot crawling reports about your site